package it.polimi.traveldream.managers.credentials;

import java.util.List;

import javax.ejb.Local;

import it.polimi.traveldream.persistence.dtos.UserDTO;

@Local
public interface UserCredentialManager {

	void save(UserDTO pCLienteDTO) throws UserAlreadyExistsException;
	void delete();
	void update(UserDTO pNewUserInfo);
	UserDTO find(String pUserEmail);
	UserDTO getUserDTO();
	List<UserDTO> getAllUsersDTO();

	public static class UserAlreadyExistsException extends Exception {
		private static final long serialVersionUID = 5402437628214562219L;

		public UserAlreadyExistsException() {
			super();
		}

		public UserAlreadyExistsException(String message) {
			super(message);
		}

		public UserAlreadyExistsException(String message, Throwable throwable) {
			super(message, throwable);
		}
	}

	void remove(UserDTO selectedUser);
	void updateNome(String nome, String email);
	void updates(UserDTO self);
	UserDTO getUserDTOP();
	void remove(String selectedUser);
	
}
